Database management systems (DBMSs) are typically used in a Business Intelligence (BI) environment. The BI environment may enable business users to derive data that may be used to inform decisions about the business. For example, a typical BI query may derive data about the company's sales in a particular region. Using the sales data, the company may make decisions about staffing to increase sales in that region.
In a typical BI environment, a relational query language, such as SQL may be used to query business data. Such queries typically involve correlated subqueries, which may incur negative performance implications for the DBMS.
One way of executing correlated subqueries may be to determine a set of qualifying rows in an inner table for each row in an outer table. An aggregate of the inner table may then be computed over the rows selected from the inner table and a predicate may be applied. In this manner, the rows from the inner table may be repeatedly accessed for each row in the outer table, which may lead to long execution times.